<extend name="Layout:layout_dialog" />
<block name="body_main">
    <div id="xsui_container">
        {$content}
    </div>
</block>
<block name="body_after">
    <script type="text/javascript">
        // 勾选自动设置地址 2016-1-5 by sutroon
        // 选择地址 2014-12-15 by sutroon function set_address(name,telphone,address,zip){$('input[name="name"]').val(name);$('input[name="telphone"]').val(telphone);$('input[name="address"]').val(address);$('input[name="zip"]').val(zip);}
        $('td :checkbox').click(function () {
            if ('undefined' == typeof (window.parent.set_address)) {
                alert('未设置选择地址的方法!');
            } else {
                var $tr = $(this).parent().parent();
                $tr.siblings().find(':checkbox').prop('checked',false);
                window.parent.set_address($tr.find('.name').text(), $tr.find('.telphone').text(), $tr.find('.address').text(), $tr.find('.zip').text());
            }
        })
    </script>
</block>